package com.shijunhao.graduation.service.system;

import com.shijunhao.graduation.domain.entity.SystemFileMapping;
import com.shijunhao.graduation.enums.TableName;
import com.shijunhao.graduation.service.system.BaseService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shijunhao
 * @since 2022-03-09
 */
public interface ISystemFileMappingService extends BaseService<SystemFileMapping> {

    /**
     * @param tableName: 所在表
     * @param fileId: 文件id
     * @param referenceId: 引用id
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/3/9 16:43
     * @description: 插入文件引用数据
     */
    boolean insert(TableName tableName,Long fileId,Long referenceId);

    /**
     * @param tableName: 所在表
     * @param fileId: 文件id
     * @param referenceId: 引用id
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/3/9 16:43
     * @description: 删除所在表引用id引用的文件fileId信息
     */
    boolean delete(TableName tableName,Long fileId,Long referenceId);

    /**
     * @param tableName: 所在表
     * @param referenceId: 引用id
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/3/9 16:43
     * @description: 删除所在表引用id引用的全部文件信息
     */
    boolean delete(TableName tableName,Long referenceId);
}
